﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Pampa.CRUD.Configuration;
using Pampa.WebControls;
using Pampa.MVC.Fluent.Crud.Groups;

namespace Pampa.MVC.Fluent.Crud.Items
{
    public class DateItemBuilder<TGroup, TEditor> : EditItemBuilder<TGroup, TEditor, object, DateItemBuilder<TGroup, TEditor>>
    {
        private readonly DateItem _item;

        public DateItemBuilder(DateItem item) : base(item)
        {
            _item = item;
        }

        public DateItemBuilder(GroupBuilder<TGroup, TEditor> group, DateItem item) : base(group, item)
        {
            _item = item;
            _item.Type = DatePickerType.FullDate;
        }

        public DateItemBuilder<TGroup, TEditor> MontYear()
        {
            _item.Type = DatePickerType.MonthYear;
            return this;
        }
    }
}
